package com.sip.stream.utils.zfy.yuv;

import com.gosuncn.zfyluancher.ZFYLauncherJNI;
import com.sip.stream.utils.ImageYUVBean;

public class NV21Changer extends INV12Changer {
    public NV21Changer(int width, int height) {
        super(width, height);
    }

    @Override
    public byte[] changeToNV12(ImageYUVBean imageYUVBean) {
        byte[] cameraData = imageYUVBean.getCameraData();
        if (ZFYLauncherJNI.NV12ToNV21(cameraData, cameraData, this.width, this.height) == 0) {
            return cameraData;
        }
        YUVToolFactory.recycleData(cameraData);
        return null;
    }
}
